package com.happy.cat.framework.config;

import cn.jiguang.common.ClientConfig;
import cn.jpush.api.JPushClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
//@Configuration
public class JPushConfigurer {

//	@Value("${jpush.app-key}")
	private String appKey;

//	@Value("${jpush.master-secret}")
	private String masterSecret;
	
	
	@Bean
	public JPushClient jpushClient() {
		JPushClient jpushClient = new JPushClient(masterSecret, appKey, null, ClientConfig.getInstance());
		return jpushClient;
	}
}
